package com.ljx.funchat.sensitive.dao;

import com.ljx.funchat.sensitive.domain.entity.SensitiveWord;
import com.ljx.funchat.sensitive.mapper.SensitiveWordMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * <p>
 * 铭感词表 服务实现类
 * </p>
 *
 * @author LiJunXi
 * @since 2024-02-22
 */
@Service
public class SensitiveWordDao extends ServiceImpl<SensitiveWordMapper, SensitiveWord> {

    public List<String> getSensitiveWordList() {
        return lambdaQuery().select(SensitiveWord::getContent).list()
                .stream().map(SensitiveWord::getContent).collect(Collectors.toList());
    }

}
